package com.online.service;

import com.online.entity.StudentAnswer;

import java.util.List;

public interface StudentAnswerService {

    /**
     * 提交一份学生的答案
     * @param studentAnswer
     * @return
     */
    int insertAStudentAnswer(StudentAnswer studentAnswer);

    /**
     * 查询学生的一份答案
     * @param studentNumber
     * @param examId
     * @return
     */
    List<StudentAnswer> showAStudentAnswer(String studentNumber, Integer examId);

    /**
     * 查询学生答卷id
     * @param studentNumber
     * @return
     */
    List<Integer> showStudentAnswerExamId(String studentNumber);

    /**
     * 查询一份试卷选择题答案
     * @param studentNumber
     * @param examId
     * @return
     */
    List<StudentAnswer> showStudentOptionAnswer(String studentNumber, Integer examId);

    /**
     * 查询一份试卷填空题答案
     * @param studentNumber
     * @param examId
     * @return
     */
    List<StudentAnswer> showStudentBlankAnswer(String studentNumber, Integer examId);

    /**
     * 删除一条答案
     * @param examId
     * @return
     */
    int deleteARecord(int examId);

    /**
     * 查询某一次测试已经提交答案的学生数
     * @param examId
     * @return
     */
    List<StudentAnswer>  countDeliver(Integer examId);

    /**
     * 查询学生所有的答案信息
     * @param studentNumber
     * @return
     */
    List<StudentAnswer> showStudentAnswerList(String studentNumber);

    /**
     * 删除学生的所有答案信息
     * @param studentNumber
     * @return
     */
    int deleteRecordByStudentNumber(String studentNumber);
}
